{{include file="header_inc.html"}}
<body>
	<div class="pad-lr-10">
		<form action="/content/comment/batchdel/" method="post">
			<input name="commentid" type="hidden" value="{{$commentid}}">
			<div class="comment">
				{{foreach item=content from=$Comment_list}}
				<div id="tbody_{{$content.id}}">
					<h5 class="title fn">
						<span class="rt"> <input class="button" type="button"
							value="删除" onclick="deleteComment({{$content.id}})" />
						</span> <input type="checkbox" name="ids[]" value="{{$content.id}}">
						{{if $content.direction==0}} {{elseif $content.direction==1}} <img
							src="{{#siteImgPath#}}/icon/zheng.png" /> {{elseif
						$content.direction==2}} <img src="{{#siteImgPath#}}/icon/fan.png" />
						{{elseif $content.direction==3}}<img
							src="{{#siteImgPath#}}/icon/zhong.png" /> {{/if}}
						{{$content.username}} ({{$content.ip}}) 于{{$content.ctime}} 发布
						支持数：{{$content.support}}
					</h5>
					<div class="content">
						<pre>{{$content.content}}</pre>
					</div>
					<div class="bk20 hr mb8"></div>
				</div>
				{{/foreach}}
			</div>
			<div class="btn">
				<label for="check_box"><input type="checkbox"
					onclick="selectall('ids[]');" id="check_box"
					style="width: 0px; height: 0px;" />全选/取消</label> <input type="submit"
					onclick="return confirm('您确定删除吗？')" class="button" value="删除" />
			</div>
		</form>

		<div id="pages">{{$pageBlock}}</div>
	</div>
	<script type="text/javascript">
		function deleteComment(id) {
			if (id == '') {
				window.top.art.dialog({icon: 'error',content:'参数错误!'});
			}
			if(confirm('您确定删除吗？')){
				$.post('/content/comment/del/' + Math.random(),{id:id},
					function(data) {
						if (data == 1) {
							$('#tbody_' + id).fadeOut("slow",function(){$('#tbody_' + id).remove()});
						} else if(data == -1) {
							window.top.art.dialog({icon: 'error',content:'参数错误!'});
						}else{
							window.top.art.dialog({icon: 'error',content:'系统错误，请稍候重试!'});
					}
				});
			}
		}
	</script>
</body>
{{include file="footer.html"}}
